package com.wtpm.sys.util;

import java.util.List;

import com.wtpm.sys.vo.LoginMenuVO;

public class SysUtil {

	public static void toMenuTree(LoginMenuVO root, List<LoginMenuVO> list) {
		LoginMenuVO menuvo = null;
		for (int i = 0; list != null && i < list.size(); i++) {
			menuvo = list.get(i);
			if (root.getId().equals(menuvo.getPid())) {
				root.addSubMenu(menuvo);
				toMenuTree(menuvo, list);
			}
		}
	}
}
